chore(linter): declare_oxc_lint! accept docs from a const#18603
chore(linter): declare_oxc_lint! accept docs from a const#18603
declare_oxc_lint! accept docs from a const#18603Conversation
How to use the Graphite Merge QueueAdd either label to this PR to merge it via the merge queue:
You must have a Graphite account in order to use the merge queue. Sign up using this link. An organization admin has enabled the Graphite Merge Queue in this repository. Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue. This stack of pull requests is managed by Graphite. Learn more about stacking. |
7448224 to
16da109
Compare
There was a problem hiding this comment.
Pull request overview
Updates the declare_oxc_lint! proc-macro parser/codegen to support sourcing rule documentation from a shared constant (via a docs = path::TO_CONST option) in addition to inline doc comments.
Changes:
- Introduces a
DocumentationSourceenum to represent inline docs vs. a referenced constant path. - Extends macro argument parsing with a
docs = ...option and improves unknown-key handling by returningsyn::Errorinstead of panicking. - Adjusts generated
RuleMeta::documentation()to emit docs based on the selected documentation source.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
16da109 to
b26c547
Compare
|
@camc314 any thoughts about this solution? Would wait for your approval before restacking and continue the work |
|
Yeah this approach looks good - I think the name "shared" might be a little to ambiguous - maybe we want something to indicate that it's shared between the two vitest/jest plugins? |
b26c547 to
fa08031
Compare
Merging this PR will not alter performance
Comparing Footnotes
|
The goal is to share other plugins rule like They have only one different default option. Updated the branch, checking for the others PRs (broken because of conflicts) |
fa08031 to
330758b
Compare

Uh oh!
There was an error while loading. Please reload this page.